---
title: 'Update backfill'
api: 'PATCH /sinks/{sink_id_or_name}/backfills/{backfill_id}'
---

import ResponseSnippet from '/snippets/backfill-response-snippet.mdx'

Updates an existing backfill.

## Request fields

<ParamField path="sink_id_or_name" type="string" required>
  The name or ID of the sink
</ParamField>

<ParamField path="backfill_id" type="string" required>
  The ID of the backfill to update
</ParamField>

<ParamField body="state" type="string">
  The new state of the backfill (active, cancelled)
</ParamField>

## Response fields

<ResponseSnippet />

<RequestExample>
  ```bash cURL
  curl -X PATCH "https://api.sequinstream.com/api/sinks/kafka-ids/backfills/e0c918bb-12a2-4810-94a3-387cd672a478" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"state": "cancelled"}'
  ```
</RequestExample> 
